<div class="cars view">
<h2><?php  echo __('%s - %s',$car['Car']['marca'],$car['Car']['modelo']); ?></h2>
	<dl>
		<dt><?php echo __('Cliente'); ?></dt>
		<dd>
			<?php echo h($car['Client']['nombre']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Chapa'); ?></dt>
		<dd>
			<?php echo h($car['Car']['chapa']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Vim'); ?></dt>
		<dd>
			<?php echo h($car['Car']['vim']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Marca'); ?></dt>
		<dd>
			<?php echo h($car['Car']['marca']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Modelo'); ?></dt>
		<dd>
			<?php echo h($car['Car']['modelo']); ?>
			&nbsp;
		</dd>
		
	</dl>
</div>
<div class="actions">
	<h3><?php echo __('Actions'); ?></h3>
	<ul>
		<li><?php echo $this->Html->link(__('Editar Vehículo'), array('action' => 'edit', $car['Car']['id'])); ?> </li>
		<li><?php echo $this->Form->postLink(__('Borrar Vehículo'), array('action' => 'delete', $car['Car']['id']), null, __('Esta seguro que desea eliminar el vehículo %s - %s?', $car['Car']['marca'],$car['Car']['modelo'])); ?> </li>
		<li><?php echo $this->Html->link(__('Nuevo Servicio'), array('controller' => 'services', 'action' => 'add',$car['Car']['id'])); ?> </li>
		<li><?php  echo $this->Html->link('Volver',"javascript:history.back()"); ?> </li>
	</ul>
</div>
<div class="related">
	<h3><?php echo __('Servicos realizados'); ?></h3>
	<?php if (!empty($car['Service'])): ?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php echo __('Descripcion'); ?></th>
		<th><?php echo __('Fecha'); ?></th>
		<th><?php echo __('Kilometraje'); ?></th>
		<th class="actions"><?php echo __('Acciones'); ?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($car['Service'] as $service): ?>
		<tr>
			<td><?php echo $service['descripcion']; ?></td>
			<td><?php echo $service['fecha']; ?></td>
			<td><?php echo $service['kilometraje']; ?></td>
			<td class="actions">
				<?php echo $this->Html->link(__('Imprimir'), array('controller' => 'services', 'action' => 'imprimir', $service['id'])); ?>
				<?php echo $this->Html->link(__('Detalles'), array('controller' => 'services', 'action' => 'view', $service['id'])); ?>
				<?php echo $this->Html->link(__('Editar'), array('controller' => 'services', 'action' => 'edit', $service['id'])); ?>
				<?php echo $this->Form->postLink(__('Borrar'), array('controller' => 'services', 'action' => 'delete', $service['id']), null, __('Esta seguro que desea eliminar el servicio?')); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>

	<div class="actions">
		<ul>
			<li><?php echo $this->Html->link(__('Nuevo Servicio'), array('controller' => 'services', 'action' => 'add',$car['Car']['id'])); ?> </li>
		</ul>
	</div>
</div>
